package com.itheima;

import java.util.Scanner;

public class StringReverse {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Please input a string :");
        String str = sc.nextLine();
        str = Reverse(str);
        System.out.println("After reverse , the string is :" );
        System.out.println(str);
    }
    public static String Reverse(String str){
        String s_re = "";
        for(int i = str.length() - 1; i >= 0 ; i--)
            s_re += str.charAt(i);

        return s_re;
    }
}
